<div>
  <?php echo "<h3>".$this->title."</h3>";
   
   $wynik = $this->wynik;
   if($wynik){
       
            foreach($wynik as $x ) : 
            $temp = $x['title'];
            if($x['idmovietype']==1){
                $typ="Wersja filmu: HD";
                $typogladania="ogladajhd";
            }
            else if ($x['idmovietype']==2){
                $typ="Wersja filmu: SD";
                $typogladania="ogladajsd";
            }
            else if ($x['idmovietype']==3){
                $typ="Serial";
                $typogladania="ogladajserial";
            }
            else{
                $typ="Film/Bajka dla dzieci";
                $typogladania="ogladajjunior";
            };
            ?><a href="<?php echo $this->url(array('controller'=>'zalogowani', 
                               'action'=>$typogladania, 'iduser'=>$this->iduser, 'nazwa'=>$temp));?>"><?php echo $x['title']."    ...............................    ".$typ."<br>";?></a>
            <?php endforeach;
   }
   else{
            echo "Brak wyników.";  
   }
  ?>
</div>